package team.seekers.skill.common.utils;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;
import team.seekers.skill.common.enums.RoleEnum;

import javax.management.relation.Role;
import java.util.Collection;

public class UserInfo extends User {

    private String userId;

    private RoleEnum role;

    public String getUserId() {
        return userId;
    }

    public RoleEnum getRole(){
        return role;
    }

    public UserInfo(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }
    public UserInfo(String username, String password,String userId, RoleEnum role ,Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
        this.userId = userId;
        this.role = role;
    }
}
